package com.silverhaze.diamond.client.ui.table.shells;

import com.silverhaze.diamond.common.entity.Service;
import com.silverhaze.diamond.client.utils.ProjectUtils;

/**
 * SystemUser: Babanin
 * Date: 22.07.2008
 * Time: 20:20:26
 */
public class ServiceShell<V extends Comparable> implements Comparable {

    private Service object;
    private V value;

    public ServiceShell(Service object, V value) {
        this.object = object;
        this.value = value;
    }

    public Service getObject() {
        return object;
    }

    public V getValue() {
        return value;
    }

    public boolean isComplete() {
        return object.isServiceComplete();
    }

    public int compareTo(Object o) {
        return value.compareTo(((ServiceShell) o).getValue());
    }

    public String getToolTipText(){
        return ProjectUtils.generateToolTipByService(object);
    }
}

